package com.cefa.edu.dao;

import com.cefa.edu.pojo.Role;
import org.apache.ibatis.annotations.*;

/**
 * Created by cc664 on 2018/8/13.
 * @aa RoleMapper
 */
@Mapper
public interface  RoleMapper {

    /**
     * @aa 根据roleType 获取对应的role对象
     * @aa add by chaijian 2018-8-13
     * @return Role对象
     */
   @Results(id = "roleMap",value = {
           @Result(property = "id",column = "id"),
           @Result(property = "roleNameEnglish",column = "role_name_english"),
           @Result(property = "type",column = "type"),
           @Result(property = "roleNameChinese",column = "role_name_chinese")
   }
   )
    @Select({"select r.* from cefa_edu_role r where r.type=#{type}"})
    Role getRoleByRoleType(Integer type);
}
